<?php /* Smarty version Smarty-3.1.6, created on 2017-09-21 12:02:17
         compiled from "D:\wamp64\www\sama\Tpl\FrontChannel\post_list.html" */ ?>
<?php /*%%SmartyHeaderCode:1548259c0d7aa2c6a84-38160259%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '605fc997dfc3e06efd1c5bd5bc464a88708141b6' => 
    array (
      0 => 'D:\\wamp64\\www\\sama\\Tpl\\FrontChannel\\post_list.html',
      1 => 1505455832,
      2 => 'file',
    ),
    'a3d5459f7f5a8a2b6cc7d0536e24b1d9890fe746' => 
    array (
      0 => 'D:\\wamp64\\www\\sama\\Tpl\\home.html',
      1 => 1505964471,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1548259c0d7aa2c6a84-38160259',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.6',
  'unifunc' => 'content_59c0d7ab4c494',
  'variables' => 
  array (
    'pc_site' => 0,
    'version' => 0,
    'user_id' => 0,
    'wx_share_link' => 0,
    'share_info' => 0,
    'head_title' => 0,
    'signPackage' => 0,
    'tpl_path' => 0,
    'kf_info' => 0,
    'is_read' => 0,
    'has_deflt_addr' => 0,
    'default_addr_string' => 0,
    'first' => 0,
    'client_ip' => 0,
    'npw_pay' => 0,
    'isios' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_59c0d7ab4c494')) {function content_59c0d7ab4c494($_smarty_tpl) {?><?php if ($_smarty_tpl->tpl_vars['pc_site']->value==1){?>
<!doctype html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<!-- Mobile Specific Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title><?php echo $_smarty_tpl->tpl_vars['head_title']->value;?>
</title>
<!-- CSS -->
<link rel="stylesheet" href="__PUBLIC__/Css/front/style.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
">
<link rel="stylesheet" href="__PUBLIC__/Css/front/colors.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
">
<link rel="stylesheet" href="__PUBLIC__/Css/front/skeleton.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
">
<link rel="stylesheet" href="__PUBLIC__/Css/front/layout.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
">
<link rel="stylesheet" href="__PUBLIC__/Css/front/ddsmoothmenu.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
">
<link rel="stylesheet" href="__PUBLIC__/Css/front/elastislide.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
">
<link rel="stylesheet" href="__PUBLIC__/Css/front/home_flexslider.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
">
<link rel="stylesheet" href="__PUBLIC__/Css/front/light_box.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
">
<link rel="stylesheet" href="__PUBLIC__/Plugins/jPops/jquery.jpops.min-v3.css">

<link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/front/front_css/refresh_load.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"/>
<link href="__PUBLIC__/Css/front/css/common_channel.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet">
<?php if ($_smarty_tpl->tpl_vars['channel_type']->value=='praise'){?>
<link href="__PUBLIC__/Css/front/css/zanshang_home.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet">
<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='reward'){?>
<link href="__PUBLIC__/Css/front/css/zanshang_home.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet">
<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='crowdfunding'){?>
<link href="__PUBLIC__/Css/front/css/zhonchou_home.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet">
<?php }else{ ?>

<?php }?>
<style type="text/css">
body{
	background: #F3F3F3;
}
</style>

<!-- 失败默认图片 -->
<script>
function no_pic(obj) {
  obj.setAttribute("src", "/Public/Images/front/nopicture.png");
}
</script>
</head>
<body>
	<?php echo $_smarty_tpl->getSubTemplate ("./footer.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

	<!-- <div class="container"> -->
	<?php if (@ACTION_NAME=='index'){?>
	<?php echo $_smarty_tpl->getSubTemplate ("top_ads.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
	
	<?php }?>
	<?php if (@ACTION_NAME!='login'){?>
	<?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
	
	<?php }?>
	

	
<div class="com_header">
	<a href="javascript:;" class="go_back"><i class="icon_back"></i></a><?php echo $_smarty_tpl->tpl_vars['head_title']->value;?>
<a href="/FrontIndex/message_center" class="msg native_go"><i class="icon_msg"></i><?php if ($_smarty_tpl->tpl_vars['is_read']->value){?><span class="dot"></span><?php }?></a>
</div>


<div id="load_wrapper">
	<div id="scroller">
			<div id="pullDown">
			    <span class="pullDownIcon"></span>
			</div>

			<div class="channel_header clearfix">
				<img src="<?php echo $_smarty_tpl->tpl_vars['channel']->value['icon'];?>
" alt="" class="header_img native_go" data-url="/FrontChannel/channel_info/channel_id/<?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_id'];?>
">
				<div class="header_main">
					<h1 class="title"><a href="/FrontChannel/channel_info/channel_id/<?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_id'];?>
" class="native_go"><?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_name'];?>
</a><span class="today">今日新帖<?php echo $_smarty_tpl->tpl_vars['new_post_num']->value;?>
</span></h1>
					<p class="level"><span class="rank"><?php echo $_smarty_tpl->tpl_vars['rank_name']->value;?>
</span><?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_name'];?>
</p>
					<div class="line">
						<p class="line-inner" data-width="<?php echo $_smarty_tpl->tpl_vars['exp_rate']->value;?>
"></p>
					</div>
	
					
					<!-- 关注 -->
					<div class="btn_gz" <?php if ($_smarty_tpl->tpl_vars['is_follow']->value){?>style="display:none;"<?php }?>><span></span>关注</div>

					<!-- 已关注 -->
					<div class="gz_yes" <?php if ($_smarty_tpl->tpl_vars['is_follow']->value){?>style="display:block;"<?php }else{ ?>style="display:none;"<?php }?>>已关注</div>

					<!-- 签到 -->
					<div class="qiandao" <?php if ($_smarty_tpl->tpl_vars['is_follow']->value&&!$_smarty_tpl->tpl_vars['is_sign']->value){?>style="display: block;"<?php }else{ ?>style="display: none;"<?php }?>>
						<i class="icon_qd"></i>签到
					</div>
					<!-- 已签到 -->
					<div class="qd_yes" <?php if ($_smarty_tpl->tpl_vars['is_follow']->value&&$_smarty_tpl->tpl_vars['is_sign']->value){?>style="display: block;"<?php }else{ ?>style="display: none;"<?php }?>>已签到</div>
				</div>
			</div>


			<!-- 通用列表 -->
			<div class="home_list" id='new_list'>
				<?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['post_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
$_smarty_tpl->tpl_vars['v']->_loop = true;
?>
				<div class="home_item">
					<div class="user_info clearfix">
						<a href="/FrontUserCenter/others_space/user_id/<?php echo $_smarty_tpl->tpl_vars['v']->value['user_id'];?>
" class="avatar native_go">
							<img data-src="<?php echo $_smarty_tpl->tpl_vars['v']->value['post_user']['headimgurl'];?>
?imageView2/1/w/200/h/200/imageslim" alt="photo" src="/Public/Images/img/no-img.png">
						</a>
						<div class="user_cont">
							<a class="nickname native_go" href="/FrontUserCenter/others_space/user_id/<?php echo $_smarty_tpl->tpl_vars['v']->value['user_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['v']->value['post_user']['nickname'];?>
</a>
							<?php  $_smarty_tpl->tpl_vars['title'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['title']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['v']->value['post_user_title']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['title']->key => $_smarty_tpl->tpl_vars['title']->value){
$_smarty_tpl->tpl_vars['title']->_loop = true;
?>
							<i class="tag" style="background-color: <?php echo $_smarty_tpl->tpl_vars['title']->value['title_color'];?>
"><?php echo $_smarty_tpl->tpl_vars['title']->value['title_name'];?>
</i>
							<?php } ?>
						</div>
					</div>
					<?php if ($_smarty_tpl->tpl_vars['v']->value['is_featured']==1){?>
						<a href="/FrontChannel/post_detail/post_id/<?php echo $_smarty_tpl->tpl_vars['v']->value['post_id'];?>
" class="native_go">
						<div class="item_title">
						<?php echo $_smarty_tpl->tpl_vars['v']->value['title'];?>

						</div>
						<div class="item_desc" style="-webkit-line-clamp: 1;">
						<?php echo $_smarty_tpl->tpl_vars['v']->value['content'];?>

						</div>
						<!--大图start-->
						<ul class="item_imgbox clearfix">
						<?php  $_smarty_tpl->tpl_vars['img'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['img']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['v']->value['imgs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['img']->key => $_smarty_tpl->tpl_vars['img']->value){
$_smarty_tpl->tpl_vars['img']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['img']->key;
?>
							<?php if ($_smarty_tpl->tpl_vars['k']->value==0){?>
								<div style="width: 100%;">
									<img data-src="<?php echo $_smarty_tpl->tpl_vars['img']->value['img'];?>
?imageView2/1/w/200/h/200/imageslim" alt="" src="/Public/Images/img/no-img.png">
								</div>
							<?php }else{ ?>
							<!--大图end-->
							<li style="height: 114px;">
								<?php if ($_smarty_tpl->tpl_vars['k']->value<3){?>
								<img data-src="<?php echo $_smarty_tpl->tpl_vars['img']->value['img'];?>
?imageView2/1/w/200/h/200/imageslim" alt="" src="/Public/Images/img/no-img.png">
								<?php }else{ ?>
								<div class="mask" style="margin-left: 5px">
									<div class="txt" >包含共<?php echo $_smarty_tpl->tpl_vars['v']->value['img_count'];?>
张图</div>
								</div>
								<img style="margin-left: 5px" data-src="<?php echo $_smarty_tpl->tpl_vars['img']->value['img'];?>
?imageView2/1/w/200/h/200/imageslim" alt="" src="/Public/Images/img/no-img.png">
								<?php break 1?>
								<?php }?>
							</li>
							<?php }?>
						<?php } ?>
						</ul>
					<?php }else{ ?>
					<!-- 点击文字和图片跳转到详情页 -->
					<a href="/FrontChannel/post_detail/post_id/<?php echo $_smarty_tpl->tpl_vars['v']->value['post_id'];?>
" class="native_go">
						<div class="item_title">
							<?php echo $_smarty_tpl->tpl_vars['v']->value['title'];?>

						</div>
						<div class="item_desc">
							<?php echo $_smarty_tpl->tpl_vars['v']->value['content'];?>

						</div>
						<ul class="item_imgbox clearfix">
							<?php  $_smarty_tpl->tpl_vars['img'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['img']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['v']->value['imgs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['img']->key => $_smarty_tpl->tpl_vars['img']->value){
$_smarty_tpl->tpl_vars['img']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['img']->key;
?>
							<?php if ($_smarty_tpl->tpl_vars['k']->value<5){?>
							<li <?php if (!$_smarty_tpl->tpl_vars['img']->value['is_show']){?>class="blur"<?php }?>>
							<img data-src="<?php echo $_smarty_tpl->tpl_vars['img']->value['img'];?>
?imageView2/1/w/200/h/200/imageslim" alt="" src="/Public/Images/img/no-img.png">
							</li>
							<?php }else{ ?>
							<li <?php if (!$_smarty_tpl->tpl_vars['img']->value['is_show']){?>class="blur"<?php }?>>
							<div class="mask">
								<div class="txt">包含共<?php echo $_smarty_tpl->tpl_vars['v']->value['img_count'];?>
张图</div>
							</div>
							<img data-src="<?php echo $_smarty_tpl->tpl_vars['img']->value['img'];?>
?imageView2/1/w/200/h/200/imageslim" alt="" src="/Public/Images/img/no-img.png">
							</li>
							<?php }?>
							<?php } ?>
						</ul>
					<?php }?>
						<?php if ($_smarty_tpl->tpl_vars['channel_type']->value=='normal'){?>
						<div class="item_bot clearfix">
							<span class="time fl"><?php echo $_smarty_tpl->tpl_vars['v']->value['addtime'];?>
</span>
							<span class="channel fl"><?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_name'];?>
</span>
							<span class="fr pl">评论&nbsp;<?php echo $_smarty_tpl->tpl_vars['v']->value['comment_num'];?>
</span>
							<span class="fr see">查看&nbsp;<?php echo $_smarty_tpl->tpl_vars['v']->value['clickdot'];?>
</span>
						</div>
						<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='praise'){?>
						<div class="item_bot clearfix">
							<span class="time fl"><?php echo $_smarty_tpl->tpl_vars['v']->value['addtime'];?>
</span>
							<span class="fl see">查看&nbsp;<?php echo $_smarty_tpl->tpl_vars['v']->value['clickdot'];?>
</span>
							<span class="fl pl">评论&nbsp;<?php echo $_smarty_tpl->tpl_vars['v']->value['comment_num'];?>
</span>
							<span class="price fr">赞赏价：¥<?php echo $_smarty_tpl->tpl_vars['v']->value['praise_price'];?>
</span>
							<span class="fen fr"><?php echo $_smarty_tpl->tpl_vars['v']->value['avg_score'];?>
分</span>
						</div>
						<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='reward'){?>
						<div class="item_bot clearfix">
							<span class="time fl"><?php echo $_smarty_tpl->tpl_vars['v']->value['addtime'];?>
</span>
							<span class="fl see">查看&nbsp;<?php echo $_smarty_tpl->tpl_vars['v']->value['clickdot'];?>
</span>
							<span class="fl pl">评论&nbsp;<?php echo $_smarty_tpl->tpl_vars['v']->value['comment_num'];?>
</span>
							<span class="price fr">悬赏价：¥<?php echo $_smarty_tpl->tpl_vars['v']->value['reward_money'];?>
</span>
						</div>
						<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='crowdfunding'){?>
						<div class="item_bot clearfix">
							<span class="time fl"><?php echo $_smarty_tpl->tpl_vars['v']->value['addtime'];?>
</span>
							<span class="price fr">心愿价：¥<?php echo $_smarty_tpl->tpl_vars['v']->value['goal_money'];?>
</span>
							<span class="wan fr">已完成<?php echo $_smarty_tpl->tpl_vars['v']->value['cf_rate'];?>
%</span>
						</div>
						<?php }?>
					</a>
				</div>
				<?php } ?>

			</div>

			<div id="pullUp">
				<!-- <span class="pullUpIcon"></span> --><span class="pullUpLabel">上拉加载...</span>
			</div>
		</div>
	</div>


	<!-- 发布 -->
	<a href="/FrontChannel/post_<?php echo $_smarty_tpl->tpl_vars['channel_type']->value;?>
/channel_id/<?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_id'];?>
" class="native_go"><div class="post"></div></a>

	

	<!-- </div> -->
	<?php if (@ACTION_NAME!='login'){?>
	<?php echo $_smarty_tpl->getSubTemplate ("footer.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
	
	<?php echo $_smarty_tpl->getSubTemplate ("customer.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

	<?php }?>
	<script>
		var user_id = '<?php echo $_smarty_tpl->tpl_vars['user_id']->value;?>
';
		//分享信息
		var link = '<?php echo $_smarty_tpl->tpl_vars['wx_share_link']->value;?>
';
		var img = '<?php echo $_smarty_tpl->tpl_vars['share_info']->value['pic'];?>
';
		var title = '<?php echo $_smarty_tpl->tpl_vars['head_title']->value;?>
';
		var desc = '<?php echo $_smarty_tpl->tpl_vars['head_title']->value;?>
';
		var appId = '<?php echo $_smarty_tpl->tpl_vars['signPackage']->value['appId'];?>
';
		var timestamp = '<?php echo $_smarty_tpl->tpl_vars['signPackage']->value['timestamp'];?>
';
		var nonceStr = '<?php echo $_smarty_tpl->tpl_vars['signPackage']->value['nonceStr'];?>
';
		var signature = '<?php echo $_smarty_tpl->tpl_vars['signPackage']->value['signature'];?>
';
	</script>
	<!--JS-->
	<script src="__PUBLIC__/Js/front/jquery-1.8.2.min.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__PUBLIC__/Js/front/common.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__PUBLIC__/Js/front/jquery.easing.1.3.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__PUBLIC__/Js/front/ddsmoothmenu.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__PUBLIC__/Js/front/jquery.flexslider.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__PUBLIC__/Js/front/jquery.elastislide.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__PUBLIC__/Js/front/jquery.jcarousel.min.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__PUBLIC__/Js/front/jquery.accordion.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__PUBLIC__/Js/front/light_box.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__PUBLIC__/Plugins/jPops/jquery.jpops.min-v3.js"></script>
	<script src="__PUBLIC__/Js/front/html5.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__PUBLIC__/Js/front/wxapi.js"></script>
	<!--end js-->
	<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
	<!--[if lt IE 9]>
		<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	
<script type="text/javascript" src="__PUBLIC__/Js/front/js/lazy-load-img.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/front/iscroll.js"></script>

<?php if ($_smarty_tpl->tpl_vars['channel_type']->value=='normal'){?>
<script type="text/javascript" src="__PUBLIC__/Js/front/js/normal_post_load.js"></script>
<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='praise'){?>
<script type="text/javascript" src="__PUBLIC__/Js/front/js/praise_post_load.js"></script>
<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='reward'){?>
<script type="text/javascript" src="__PUBLIC__/Js/front/js/reward_post_load.js"></script>
<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='crowdfunding'){?>
<script type="text/javascript" src="__PUBLIC__/Js/front/js/cf_post_load.js"></script>
<?php }?>


	
<script>
	var total = parseInt('<?php echo $_smarty_tpl->tpl_vars['total']->value;?>
');
    var firstRow = parseInt('<?php echo $_smarty_tpl->tpl_vars['firstRow']->value;?>
');
    var channel_id = '<?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_id'];?>
'
    var channel_name = '<?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_name'];?>
'
    var signing = false;
    var following = false;
    var $is_sign = '<?php echo $_smarty_tpl->tpl_vars['is_sign']->value;?>
';
    // var is_sign = <?php if ($_smarty_tpl->tpl_vars['is_sign']->value){?>true<?php }else{ ?>false<?php }?>;
    var is_sign = <?php if ($_smarty_tpl->tpl_vars['is_sign']->value){?>true<?php }else{ ?>false<?php }?>;

	
	$(function(){
		var imgw = $('.item_imgbox li').width()
		imgh = $('.item_imgbox li').height(imgw);

		// 百分比
		$('.line-inner').width($('.line-inner').attr("data-width")+"%");

		var lazyLoadImg = new LazyLoadImg({
	        el: document.querySelector('#load_wrapper'),
	        mode: 'default', //默认模式，将显示原图，diy模式，将自定义剪切，默认剪切居中部分
	        time: 250, // 设置一个检测时间间隔
	        complete: true, //页面内所有数据图片加载完成后，是否自己销毁程序，true默认销毁，false不销毁
	        position: { // 只要其中一个位置符合条件，都会触发加载机制
	          top: 0, // 元素距离顶部
	          right: 0, // 元素距离右边
	          bottom: 0, // 元素距离下面
	          left: 0 // 元素距离左边
	        },
	        before: function () { // 图片加载之前执行方法
	          
	        },
	        success: function (el) { // 图片加载成功执行方法
	          // el.classList.add('success')
	        },
	        error: function (el) { // 图片加载失败执行方法
	          // el.src = './images/error.png'
	        }
	    })
	    //
		if(!is_ios()){
			$('.home_list .tag').css('padding-top','1px');
		}
	})
		
	

    $(function(){
    	$('.btn_gz').click(function(){
			// $(this).hide();
			// $('.gz_yes').show();
			// $('.qiandao').show();
			if(following){
				return;
			}
			following = true;
			follow(1);
		})
	    
	    $('.qiandao').on('click',function(){
	    	if(signing){
	    		return;
	    	}
	    	signing = true;
	    	$.ajax({
	    		url:'/FrontChannel/sign',
	    		type:'post',
	    		data:{channel_id:channel_id},
	    		success:function(r){
	    			if(r.code == 1){
	    				$('#tan').html(r.msg);
	    				tishi();
	    			}else{
	    				is_sign = true;
	    				var imgw = $('.item_imgbox li').width()
						imgh = $('.item_imgbox li').height(imgw);
						// 百分比
						$('.line-inner').width(r.exp_rate+"%")
						$('.rank').html(r.rank);

	    				$('.qiandao').hide();
				    	toast('已签到成功', 'succ');
						$('.qd_yes').show();
						native_listen('follow_channel');// 签到因为刷新页面相同 所以用同一事件
	    			}
	    			signing = false;
	    		}
	    	})

	    	
	    })  
    });
    // 取消关注
    $('.gz_yes').on('click',function(){
		// $(this).hide();
		// $('.qd_yes').hide();
		// $('.qiandao').hide();
		// $('.btn_gz').show();
		if(following){
			return;
		}
		following = true;
		follow(2);
    })


    function follow(type){
    	//1关注，2取关
    	$.ajax({
    		url:'/Front/follow_channel',
    		type:'post',
    		data:{channel_id:channel_id},
    		success:function(r){
    			if(type == 1){
    				if(r.code == 1){
    					$('#tan').html(r.msg);
    				}else{
    					$('.btn_gz').hide();
						$('.gz_yes').show();
						if(is_sign){
							$('.qd_yes').show();
						}else{
							$('.qiandao').show();
						}
						$('.rank').html(r.rank);
						native_listen('follow_channel');
    				}
    				following = false;
    			}else if(type == 2){
    				if(r.code == 1){
    					$('#tan').html(r.msg);
    				}else{
    					$('.gz_yes').hide();
				    	$('.qd_yes').hide();
						$('.qiandao').hide();
				    	$('.btn_gz').show();
						native_listen('follow_channel');
    				}
    				following = false;
    			}
    		}
    	})
    }

    

 
</script>


</body>
</html>
 
<?php }else{ ?>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta name="format-detection" content="telephone=no" />
	<meta name="format-detection" content="email=no" />
	<meta name="apple-mobile-web-app-title" content="盈软微分销" />
	<?php if (@ACTION_NAME=='cart'){?>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">  
	<?php }?>
	<title><?php echo $_smarty_tpl->tpl_vars['head_title']->value;?>
</title>
	<!-- <link href="__PUBLIC__/Css/front/front_css/mui.min.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet"> -->
	<link href="__PUBLIC__/Css/front/common.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet">
	<!-- <link href="<?php echo $_smarty_tpl->tpl_vars['tpl_path']->value;?>
/css/header_footer.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet"> -->
	<link href="__PUBLIC__/Css/front/layer.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet">
	<!-- <link href="__PUBLIC__/Css/front/front_css/icon_one.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet"> -->
	<link href="__PUBLIC__/Css/front/css/nav.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet">
	<link rel="stylesheet" style="text/css" href="__PUBLIC__/Css/front/swiper.3.1.2.min.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
">

	<!-- <link href="__PUBLIC__/Css/front/front_css/y_main.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet"> -->
	<!--<script src="http://libs.baidu.com/jquery/2.1.1/jquery.min.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>-->
    <!--设置rem-->
	<script type="text/javascript">
//!(function(doc, win) {
//  var docEle = doc.documentElement,
//      evt = "onorientationchange" in window ? "orientationchange" : "resize",
//      fn = function() {
//          var width = docEle.clientWidth;
//          width && (docEle.style.fontSize = 20 * (width / 375) + "px");
//      };
//  win.addEventListener(evt, fn, false);
//  doc.addEventListener("DOMContentLoaded", fn, false);
//}(document, window));
	</script>
	<script src="__JS__/jquery/jquery-1.9.1.min.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/front/front_css/refresh_load.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"/>
<link href="__PUBLIC__/Css/front/css/common_channel.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet">
<?php if ($_smarty_tpl->tpl_vars['channel_type']->value=='praise'){?>
<link href="__PUBLIC__/Css/front/css/zanshang_home.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet">
<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='reward'){?>
<link href="__PUBLIC__/Css/front/css/zanshang_home.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet">
<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='crowdfunding'){?>
<link href="__PUBLIC__/Css/front/css/zhonchou_home.css?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
" type="text/css" rel="stylesheet">
<?php }else{ ?>

<?php }?>
<style type="text/css">
body{
	background: #F3F3F3;
}
</style>

	<style type="text/css">
		.layermcont{
			text-align: center;
		}
		.layermchild .layermbtn span{
			color: #2485e8;
		}
	


	/*弹窗*/
	#toast{
		display: none;
	}
	.toast-mask_transparent {
	    position: fixed;
	    z-index: 1000;
	    top: 0;
	    right: 0;
	    left: 0;
	    bottom: 0;
	}
	.toast {
	    position: fixed;
	    z-index: 5000;
	    width: 5.7rem;
	    top: 50%;
	    left: 50%;
	    transform: translate(-50%, -50%);
	    background: rgba(0, 0, 0, 0.8);
	    text-align: center;
	    border-radius: 0.5rem;
	    color: #FFFFFF;
	}
	.icon_toast{
		width: 2.2rem;
		height: 2.2rem;
		
		display: block;
		margin: 1.0rem auto;
	}
	.toast .succ{
		background: url(/Public/Images/img/icon_succes_tanchuang@3x.png) no-repeat;
		background-size: 100% 100%;
		
	}
	.toast .fail{
		background: url(/Public/Images/img/icon-cuowu@3x.png) no-repeat;
		background-size: 100% 100%;
	}
	.toast_content {
	    margin: 0 0 0.75rem;
	    font-size: 0.8rem;
	    line-height: 1.1rem;
		color: #FFFFFF;
		letter-spacing: 0;
		padding:0 1em;
	}

	#loading{
		display: none;
	}
	.loading-mask_transparent {
	    position: fixed;
	    z-index: 1000;
	    top: 0;
	    right: 0;
	    left: 0;
	    bottom: 0;
	}
	.loading_cont{
	    position: fixed;
	    z-index: 5000;
	    width: 5.7rem;
	    top: 50%;
	    left: 50%;
	    transform: translate(-50%, -50%);
	    background: rgba(0, 0, 0, 0.8);
	    text-align: center;
	    border-radius: 0.5rem;
	    color: #FFFFFF;
	}
	.icon_loading{
		width: 2.2rem;
		height: 2.2rem;
		background: url(/Public/Images/img/loading-1.png) no-repeat;
		background-size: 100% 100%;
		display: block;
		margin: 1.0rem auto;
	}
	.loading_content {
	    margin: 0 0 0.75rem;
	    font-size: 0.8rem;
	    line-height: 1.1rem;
		color: #FFFFFF;
		letter-spacing: 0;
	}

	/*返回刷新*/

	.back_reload{
	    padding: 0.6rem;
	    position: absolute;
	    left: 0;
	    top: 0;
	    z-index: 100;
	}
	.back_reload .icon_back{
		background: url(/Public/Images/img/icon_return_head.png) no-repeat;
	    background-size: 100% 100%;
	    width: 0.55rem;
	    height: 1.0rem;
	    display: block
	}

		/*新建弹窗样式*/
		.toast1 {
			width: 80%;
			height: 60%;
			background: rgb(216,88,63);
		}

		/*领取头衔样式*/
		.get_title_css {
			width: 90%;
			height: 60%;
			/*background: #fedfe1;*/
		}

		.subtitle {
			font-size: 0.8rem;
			/*border-top: 0.05rem solid #ffffff;*/
			padding-top: 10%;
			color: #ffffff;
		}

		.cs_list {
			width: 100%;
			position: absolute;
			top: 4.25rem;
		}
		.Cs {
			width: 100%;
			height: 4.4rem;
			/*background-color: #ffffff;*/
			/*border-top: 0.05rem solid #fedfe1;*/
			position: relative;
		}
		.cs_head {
			width: 3.5rem;
			height: 3.5rem;
			border-radius: 0.2rem;
			display: inline-block;
			position: absolute;
			top: 0.4rem;
			left: 4.8%;
		}
		.cs_name {
			height: 1.1rem;
			line-height: 1.1rem;
			color: #ffffff;
			font-size: 0.8rem;
			position: absolute;
			top: 0.75rem;
			left: 27.2%;
		}
		.cs_conn {
			height: 1.1rem;
			line-height: 1.1rem;
			color: #ffffff;
			font-size: 0.8rem;
			position: absolute;
			top: 2.5rem;
			left: 27.2%;
		}
		.copy {
			width: 4.2rem;
			height: 1.5rem;
			line-height: 1.5rem;
			background-color: rgb(216,88,63);
			border-radius: 0.2rem;
			position: absolute;
			top: 1.4rem;
			right: 3.2%;
			color: #fff;
			font-size: 0.8rem;
			text-align: center;
		}

	</style>
</head>
<body>
	

	
<div class="com_header">
	<a href="javascript:;" class="go_back"><i class="icon_back"></i></a><?php echo $_smarty_tpl->tpl_vars['head_title']->value;?>
<a href="/FrontIndex/message_center" class="msg native_go"><i class="icon_msg"></i><?php if ($_smarty_tpl->tpl_vars['is_read']->value){?><span class="dot"></span><?php }?></a>
</div>


<div id="load_wrapper">
	<div id="scroller">
			<div id="pullDown">
			    <span class="pullDownIcon"></span>
			</div>

			<div class="channel_header clearfix">
				<img src="<?php echo $_smarty_tpl->tpl_vars['channel']->value['icon'];?>
" alt="" class="header_img native_go" data-url="/FrontChannel/channel_info/channel_id/<?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_id'];?>
">
				<div class="header_main">
					<h1 class="title"><a href="/FrontChannel/channel_info/channel_id/<?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_id'];?>
" class="native_go"><?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_name'];?>
</a><span class="today">今日新帖<?php echo $_smarty_tpl->tpl_vars['new_post_num']->value;?>
</span></h1>
					<p class="level"><span class="rank"><?php echo $_smarty_tpl->tpl_vars['rank_name']->value;?>
</span><?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_name'];?>
</p>
					<div class="line">
						<p class="line-inner" data-width="<?php echo $_smarty_tpl->tpl_vars['exp_rate']->value;?>
"></p>
					</div>
	
					
					<!-- 关注 -->
					<div class="btn_gz" <?php if ($_smarty_tpl->tpl_vars['is_follow']->value){?>style="display:none;"<?php }?>><span></span>关注</div>

					<!-- 已关注 -->
					<div class="gz_yes" <?php if ($_smarty_tpl->tpl_vars['is_follow']->value){?>style="display:block;"<?php }else{ ?>style="display:none;"<?php }?>>已关注</div>

					<!-- 签到 -->
					<div class="qiandao" <?php if ($_smarty_tpl->tpl_vars['is_follow']->value&&!$_smarty_tpl->tpl_vars['is_sign']->value){?>style="display: block;"<?php }else{ ?>style="display: none;"<?php }?>>
						<i class="icon_qd"></i>签到
					</div>
					<!-- 已签到 -->
					<div class="qd_yes" <?php if ($_smarty_tpl->tpl_vars['is_follow']->value&&$_smarty_tpl->tpl_vars['is_sign']->value){?>style="display: block;"<?php }else{ ?>style="display: none;"<?php }?>>已签到</div>
				</div>
			</div>


			<!-- 通用列表 -->
			<div class="home_list" id='new_list'>
				<?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['post_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
$_smarty_tpl->tpl_vars['v']->_loop = true;
?>
				<div class="home_item">
					<div class="user_info clearfix">
						<a href="/FrontUserCenter/others_space/user_id/<?php echo $_smarty_tpl->tpl_vars['v']->value['user_id'];?>
" class="avatar native_go">
							<img data-src="<?php echo $_smarty_tpl->tpl_vars['v']->value['post_user']['headimgurl'];?>
?imageView2/1/w/200/h/200/imageslim" alt="photo" src="/Public/Images/img/no-img.png">
						</a>
						<div class="user_cont">
							<a class="nickname native_go" href="/FrontUserCenter/others_space/user_id/<?php echo $_smarty_tpl->tpl_vars['v']->value['user_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['v']->value['post_user']['nickname'];?>
</a>
							<?php  $_smarty_tpl->tpl_vars['title'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['title']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['v']->value['post_user_title']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['title']->key => $_smarty_tpl->tpl_vars['title']->value){
$_smarty_tpl->tpl_vars['title']->_loop = true;
?>
							<i class="tag" style="background-color: <?php echo $_smarty_tpl->tpl_vars['title']->value['title_color'];?>
"><?php echo $_smarty_tpl->tpl_vars['title']->value['title_name'];?>
</i>
							<?php } ?>
						</div>
					</div>
					<?php if ($_smarty_tpl->tpl_vars['v']->value['is_featured']==1){?>
						<a href="/FrontChannel/post_detail/post_id/<?php echo $_smarty_tpl->tpl_vars['v']->value['post_id'];?>
" class="native_go">
						<div class="item_title">
						<?php echo $_smarty_tpl->tpl_vars['v']->value['title'];?>

						</div>
						<div class="item_desc" style="-webkit-line-clamp: 1;">
						<?php echo $_smarty_tpl->tpl_vars['v']->value['content'];?>

						</div>
						<!--大图start-->
						<ul class="item_imgbox clearfix">
						<?php  $_smarty_tpl->tpl_vars['img'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['img']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['v']->value['imgs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['img']->key => $_smarty_tpl->tpl_vars['img']->value){
$_smarty_tpl->tpl_vars['img']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['img']->key;
?>
							<?php if ($_smarty_tpl->tpl_vars['k']->value==0){?>
								<div style="width: 100%;">
									<img data-src="<?php echo $_smarty_tpl->tpl_vars['img']->value['img'];?>
?imageView2/1/w/200/h/200/imageslim" alt="" src="/Public/Images/img/no-img.png">
								</div>
							<?php }else{ ?>
							<!--大图end-->
							<li style="height: 114px;">
								<?php if ($_smarty_tpl->tpl_vars['k']->value<3){?>
								<img data-src="<?php echo $_smarty_tpl->tpl_vars['img']->value['img'];?>
?imageView2/1/w/200/h/200/imageslim" alt="" src="/Public/Images/img/no-img.png">
								<?php }else{ ?>
								<div class="mask" style="margin-left: 5px">
									<div class="txt" >包含共<?php echo $_smarty_tpl->tpl_vars['v']->value['img_count'];?>
张图</div>
								</div>
								<img style="margin-left: 5px" data-src="<?php echo $_smarty_tpl->tpl_vars['img']->value['img'];?>
?imageView2/1/w/200/h/200/imageslim" alt="" src="/Public/Images/img/no-img.png">
								<?php break 1?>
								<?php }?>
							</li>
							<?php }?>
						<?php } ?>
						</ul>
					<?php }else{ ?>
					<!-- 点击文字和图片跳转到详情页 -->
					<a href="/FrontChannel/post_detail/post_id/<?php echo $_smarty_tpl->tpl_vars['v']->value['post_id'];?>
" class="native_go">
						<div class="item_title">
							<?php echo $_smarty_tpl->tpl_vars['v']->value['title'];?>

						</div>
						<div class="item_desc">
							<?php echo $_smarty_tpl->tpl_vars['v']->value['content'];?>

						</div>
						<ul class="item_imgbox clearfix">
							<?php  $_smarty_tpl->tpl_vars['img'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['img']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['v']->value['imgs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['img']->key => $_smarty_tpl->tpl_vars['img']->value){
$_smarty_tpl->tpl_vars['img']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['img']->key;
?>
							<?php if ($_smarty_tpl->tpl_vars['k']->value<5){?>
							<li <?php if (!$_smarty_tpl->tpl_vars['img']->value['is_show']){?>class="blur"<?php }?>>
							<img data-src="<?php echo $_smarty_tpl->tpl_vars['img']->value['img'];?>
?imageView2/1/w/200/h/200/imageslim" alt="" src="/Public/Images/img/no-img.png">
							</li>
							<?php }else{ ?>
							<li <?php if (!$_smarty_tpl->tpl_vars['img']->value['is_show']){?>class="blur"<?php }?>>
							<div class="mask">
								<div class="txt">包含共<?php echo $_smarty_tpl->tpl_vars['v']->value['img_count'];?>
张图</div>
							</div>
							<img data-src="<?php echo $_smarty_tpl->tpl_vars['img']->value['img'];?>
?imageView2/1/w/200/h/200/imageslim" alt="" src="/Public/Images/img/no-img.png">
							</li>
							<?php }?>
							<?php } ?>
						</ul>
					<?php }?>
						<?php if ($_smarty_tpl->tpl_vars['channel_type']->value=='normal'){?>
						<div class="item_bot clearfix">
							<span class="time fl"><?php echo $_smarty_tpl->tpl_vars['v']->value['addtime'];?>
</span>
							<span class="channel fl"><?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_name'];?>
</span>
							<span class="fr pl">评论&nbsp;<?php echo $_smarty_tpl->tpl_vars['v']->value['comment_num'];?>
</span>
							<span class="fr see">查看&nbsp;<?php echo $_smarty_tpl->tpl_vars['v']->value['clickdot'];?>
</span>
						</div>
						<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='praise'){?>
						<div class="item_bot clearfix">
							<span class="time fl"><?php echo $_smarty_tpl->tpl_vars['v']->value['addtime'];?>
</span>
							<span class="fl see">查看&nbsp;<?php echo $_smarty_tpl->tpl_vars['v']->value['clickdot'];?>
</span>
							<span class="fl pl">评论&nbsp;<?php echo $_smarty_tpl->tpl_vars['v']->value['comment_num'];?>
</span>
							<span class="price fr">赞赏价：¥<?php echo $_smarty_tpl->tpl_vars['v']->value['praise_price'];?>
</span>
							<span class="fen fr"><?php echo $_smarty_tpl->tpl_vars['v']->value['avg_score'];?>
分</span>
						</div>
						<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='reward'){?>
						<div class="item_bot clearfix">
							<span class="time fl"><?php echo $_smarty_tpl->tpl_vars['v']->value['addtime'];?>
</span>
							<span class="fl see">查看&nbsp;<?php echo $_smarty_tpl->tpl_vars['v']->value['clickdot'];?>
</span>
							<span class="fl pl">评论&nbsp;<?php echo $_smarty_tpl->tpl_vars['v']->value['comment_num'];?>
</span>
							<span class="price fr">悬赏价：¥<?php echo $_smarty_tpl->tpl_vars['v']->value['reward_money'];?>
</span>
						</div>
						<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='crowdfunding'){?>
						<div class="item_bot clearfix">
							<span class="time fl"><?php echo $_smarty_tpl->tpl_vars['v']->value['addtime'];?>
</span>
							<span class="price fr">心愿价：¥<?php echo $_smarty_tpl->tpl_vars['v']->value['goal_money'];?>
</span>
							<span class="wan fr">已完成<?php echo $_smarty_tpl->tpl_vars['v']->value['cf_rate'];?>
%</span>
						</div>
						<?php }?>
					</a>
				</div>
				<?php } ?>

			</div>

			<div id="pullUp">
				<!-- <span class="pullUpIcon"></span> --><span class="pullUpLabel">上拉加载...</span>
			</div>
		</div>
	</div>


	<!-- 发布 -->
	<a href="/FrontChannel/post_<?php echo $_smarty_tpl->tpl_vars['channel_type']->value;?>
/channel_id/<?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_id'];?>
" class="native_go"><div class="post"></div></a>

	

	<?php if (@ACTION_NAME=='mall_home'||@ACTION_NAME=='all_order'||@ACTION_NAME=='pre_pay_order'||@ACTION_NAME=='pre_deliver_order'||@ACTION_NAME=='pre_confirm_order'||@ACTION_NAME=='wallet'||@ACTION_NAME=='personal_center'||@ACTION_NAME=='mall_list'||@ACTION_NAME=='item_list'){?>
	<?php echo $_smarty_tpl->getSubTemplate (($_smarty_tpl->tpl_vars['footer_path']->value), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

	<?php }?>
	<!--提示层-->
    <div id="tan_wrap"><div id="tan"></div></div>

    <!-- 通用弹窗 -->
	<div id="toast" style="display:none;">
        <div class="toast-mask_transparent"></div>
        <div class="toast">
            <i class="icon_toast"></i>
            <p class="toast_content"></p>
        </div>
    </div>

	<!-- 通用弹窗1 -->
	<div id="toast1" style="display:none;">
		<div class="toast-mask_transparent"></div>
		<div class="toast toast1">
			<div class="toast_close" style="float: right; padding: 5px 10px 0 0;">X</div>
			<i class="icon_toast">hello</i>
			<p class="toast_content">sama用户们好~~</p>
		</div>
	</div>

	<!-- 领取头衔弹窗 -->
	<div id="get_title" style="display:none;">
		<div class="toast-mask_transparent"></div>
		<div class="toast get_title_css">
			<div class="toast_close" style="float: right; padding: 5px 10px 0 0;">X</div>
			<ul class="cs_list">
				<?php if ($_smarty_tpl->tpl_vars['kf_info']->value['wx']){?>
				<li class="Cs">
					<img class="cs_head" src="<?php echo $_smarty_tpl->tpl_vars['kf_info']->value['head_img'];?>
">
					<span class="cs_name">sama小助手</span>
					<span class="cs_conn">微信号:<span style="color: #ffffff" class="kf_num"><?php echo $_smarty_tpl->tpl_vars['kf_info']->value['wx'];?>
</span></span>
					<span class="copy">点击复制</span>
				</li>
				<?php }?>

				<?php if ($_smarty_tpl->tpl_vars['kf_info']->value['qq']){?>
				<li class="Cs">
					<img class="cs_head" src="<?php echo $_smarty_tpl->tpl_vars['kf_info']->value['head_img'];?>
">
					<span class="cs_name">sama新闻组</span>
					<span class="cs_conn">QQ群号:<span style="color: #ffffff;" class="kf_num"><?php echo $_smarty_tpl->tpl_vars['kf_info']->value['qq'];?>
</span></span>
					<span class="copy">点击复制</span>
				</li>
				<?php }?>
				<div class="subtitle">(｀・ω・´)想要更多特殊头衔<br>需要添加Sama小助手的QQ或者微信申请哦</div>
			</ul>
		</div>
	</div>
	<!-- loading -->
   <div id="loading">
        <div class="loading-mask_transparent"></div>
        <div class="loading_cont">
            <i class="icon_loading"></i>
            <p class="loading_content">支付中</p>
        </div>
    </div>
	<script>
	var is_read = <?php if ($_smarty_tpl->tpl_vars['is_read']->value){?>true<?php }else{ ?>false<?php }?>;
	var has_deflt_addr = "<?php echo $_smarty_tpl->tpl_vars['has_deflt_addr']->value;?>
";
	var default_addr = "<?php echo $_smarty_tpl->tpl_vars['default_addr_string']->value;?>
";
	var first = "<?php echo $_smarty_tpl->tpl_vars['first']->value;?>
";	
    function no_pic(obj) {
         obj.setAttribute("src", "/Public/Images/noimg.png");
     }
     
	</script>
	
	<script src="__JS__/front/custom.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__JS__/front/layer.m.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__PUBLIC__/Js/front/swiper.3.1.2.jquery.min.js"></script>
	<script src="__PLG__/native/native_event.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>
	<script src="__JS__/clipboard.min.js"></script>
	<!--<script src="__JS__/front/mui.min.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script>-->
	<script>
		// 弹窗js
		function toast(msg,cls){
			var $toast = $('#toast');
			$toast.find('.toast_content').html(msg);
			$toast.find('.icon_toast').removeClass('succ');
			$toast.find('.icon_toast').removeClass('fail');
			$toast.find('.icon_toast').addClass(cls);

    	 	if ($toast.css('display') != 'none') return;
        	$toast.fadeIn(300);
            setTimeout(function () {
                $toast.fadeOut(300);
            }, 2000);
		}
		// 提示
		function tan_tishi(msg){
			$('#tan').html(msg)
			tishi();
		}
		//安卓行高问题
		if(!is_ios()){
			$('.tag').css('padding-top','1px');
		}
	</script>
	<script>
	//获取后台数据
	ip = "<?php echo $_smarty_tpl->tpl_vars['client_ip']->value;?>
";
	az_id = 1;
	user_id = '<?php echo $_smarty_tpl->tpl_vars['user_id']->value;?>
';
	var npw_pay = parseInt('<?php echo $_smarty_tpl->tpl_vars['npw_pay']->value;?>
');
	var isios = parseInt('<?php echo $_smarty_tpl->tpl_vars['isios']->value;?>
');
	</script>
	<script>
		var user_id = '<?php echo $_smarty_tpl->tpl_vars['user_id']->value;?>
';
		//分享信息
		var link = '<?php echo $_smarty_tpl->tpl_vars['wx_share_link']->value;?>
';
		var img = '<?php echo $_smarty_tpl->tpl_vars['share_info']->value['pic'];?>
';
		var title = '<?php echo $_smarty_tpl->tpl_vars['head_title']->value;?>
';
		var desc = '<?php echo $_smarty_tpl->tpl_vars['head_title']->value;?>
';
		var appId = '<?php echo $_smarty_tpl->tpl_vars['signPackage']->value['appId'];?>
';
		var timestamp = '<?php echo $_smarty_tpl->tpl_vars['signPackage']->value['timestamp'];?>
';
		var nonceStr = '<?php echo $_smarty_tpl->tpl_vars['signPackage']->value['nonceStr'];?>
';
		var signature = '<?php echo $_smarty_tpl->tpl_vars['signPackage']->value['signature'];?>
';
//alert('title = ' + title + ', desc = ' + desc + ', link = ' + link + ', img = ' + img);
	</script>
	<?php if (@ACTION_NAME!='mall_home'&&@ACTION_NAME!='item_list'&&@ACTION_NAME!='item_detail'){?>
	<script type="text/javascript">
		//用户是否登录
		$(function(){
			if(user_id == null || user_id == 0 || user_id == '' || user_id == '0'){
				console.log('没登录');
				console.log('no_login');
				// native_listen('no_login');
			}
		})

        //点击复制
        $('.copy').on('click',function(){
            var kf_num = $(this).siblings('span').find('.kf_num').text();
            console.log(kf_num);
            native_listen('copy_kf_num',{
                kf_num:kf_num
            })
        });


	</script>
	<?php }?>
	<script type="text/javascript">
	
	
		
		//链接
		$("body").on("click",".native_go",function(){
	
			<?php if (@ACTION_NAME=='post_list'){?>
	
			if($(this).find('.post').length > 0){
				var check_post = false;
				$.ajax({
					url:'/Front/check_post',
					type:'post',
					data:{channel_id:channel_id},
					async:false,
					success:function(r){
						if(r.code == 1){
							check_post = true;
						}else{
							tan_tishi(r.msg)
						}
					}
				})
				if(check_post === false){
					// tan_tishi('请先关注频道');
					return false;
				}
			}
	
			<?php }?>
	
			if (!is_wechat()) {
				
					var href = $(this).attr("href");

					if(href){
						var is_tel = href.indexOf("tel");
					}
					var load_label = $(this).data('label');
					if(href=="javascript:;"){
						//$(this).attr("data-url");
					}
					else if(is_tel > -1)
					{
						//null
					}
					else
					{	
						$(this).attr("href","javascript:;");
						$(this).attr("data-url",href);
					}

					var dataUrl = $(this).attr("data-url");
					console.log(dataUrl);
					
					var is_login = false;
					// $.ajax({
					// 	url:'/Front/check_login',
					// 	async:false,
					// 	success:function(r){
					// 		if(r == 1){
					// 			is_login = true;
					// 		}
					// 	}
					// })
					is_login = check_login();
					if(is_login === false){
						native_listen('no_login');
						return false;
					}

					// console.log(load_label);
					if(load_label == 'download')
					{
						var _json = JSON.stringify({
				            event: "download",
				            params: {"url":dataUrl}
				        });
					}
					else
					{
						var _json = JSON.stringify({
				            event: "to_jump",
				            params: {"url":dataUrl}
				        });
					}
					
			        //电话链接判断
			        if(is_tel > -1){
			        	//null
			        }else{
			        	if(is_ios()){

							window.webkit.messageHandlers.webviewEvent.postMessage(_json);
						}else{
							window.ResultAndroid.webviewEvent(_json);
						}
			        }
					
		  }	
		});

		//返回
		$('.go_back').on('click', function(){
				console.log(1)
				if(!is_wechat()){
					native_listen('back');
				}else{
					history.go(-1);
				}
		})

		//返回刷新
		$('.back_reload').on('click', function(){
			console.log(1)
			if(!is_wechat()){
				native_listen('back_reload');
			}else{
				history.go(-1);
			}
		})
		// 分享功能
		function return_share()
		{
			if (!is_wechat()) {
				native_listen('share_item',{
					item_name:share_title,
					item_desc:share_desc,
					basc_pic:share_pic,
					share_url:share_url,
				})
			}
		}
		
		function check_login(){
			var is_login = false;
			$.ajax({
				url:'/Front/check_login',
				async:false,
				success:function(r){
					if(r == 1){
						is_login = true;
					}
				}
			})

			return is_login;
		}


		function set_msg_dot(sx_num, reply_num, at_num ,sys_num){

			if($('.com_header').length > 0){
				var dot_len = $('.com_header').find('.dot').length;
				if(reply_num > 0 || at_num > 0 || sx_num > 0 || sys_num > 0){
					if(dot_len == 0){
						$('.com_header').find('.msg').append('<span class="dot"></span>')
					}
				}else{
					$('.com_header').find('.dot').remove();
				}
				
			}else if($('.title').length > 0){
				
				var dot_len = $('.icon_info').find('.point').length;
				if(reply_num > 0 || at_num > 0 || sx_num > 0 || sys_num > 0){
					if(dot_len == 0){
						$('.title').find('.icon_info').append('<div class="point"></div>')
					}
				}else{
					$('.title').find('.point').remove();
				}
				
			}else if($('.title_headbox').length > 0){
				var dot_len = $('.others_info_icon').find('.point').length;
				if(reply_num > 0 || at_num > 0 || sx_num > 0 || sys_num > 0){
					if(dot_len == 0){
						$('.title_headbox').find('.others_info_icon').append('<div class="point"></div>')
					}
				}else{
					$('.title_headbox').find('.point').remove();
				}
			}else if($('.others_personal_head_box').length > 0){
				var dot_len = $('.others_personal_head_box').find('.point').length;
				if(reply_num > 0 || at_num > 0 || sx_num > 0 || sys_num > 0){
					if(dot_len == 0){
						$('.others_personal_head_box').find('.others_info_icon').append('<div class="point"></div>')
					}
				}else{
					$('.others_personal_head_box').find('.point').remove();
				}
			}

		}

		function have_sx(num){
			var sx_num = parseInt(num);
			
			if(sx_num > 0 ){
				
				if($('.sx').length > 0){
					if(sx_num > 99){
						sx_val = '99+';
					}else{
						sx_val = sx_num.toString();
					}

					if($('.sx').find('.num').length > 0){
						$('.sx').find('.num').html(sx_val)
					}else{
						$('.sx').find('.txt').after('<strong class="num" data-sx_num="'+sx_num+'">'+sx_val+'</strong>');
					}

				}
				
			}else{
				$('.sx').find('.num').remove()
			}

			var reply_num = 0;
			var at_num = 0;
			var sys_num = 0;
			$.ajax({
				url:'/Front/get_no_read',
				type:'post',
				async:false,
				success:function(r){
					reply_num = parseInt(r.reply_num);
					at_num = parseInt(r.at_num);
					sys_num = parseInt(r.sys_num);
					if(reply_num == 0 && at_num == 0 && sys_num == 0){
						is_read = false;
					}else{
						is_read = true;
					}
				}
			})

			if(reply_num > 0 ){
				
				if($('.reply').length > 0){
					if(reply_num > 99){
						reply_val = '99+';
					}else{
						reply_val = reply_num.toString();
					}

					if($('.reply').find('.num').length > 0){
						$('.reply').find('.num').html(reply_val)
					}else{
						$('.reply').find('.txt').after('<strong class="num" data-sx_num="'+reply_num+'">'+reply_val+'</strong>');
					}

				}
				
			}else{
				$('.reply').find('.num').remove()
			}

			if(at_num > 0 ){
				
				if($('.at').length > 0){
					if(at_num > 99){
						at_val = '99+';
					}else{
						at_val = at_num.toString();
					}

					if($('.at').find('.num').length > 0){
						$('.at').find('.num').html(at_val)
					}else{
						$('.at').find('.txt').after('<strong class="num" data-sx_num="'+at_num+'">'+at_val+'</strong>');
					}

				}
				
			}else{
				$('.at').find('.num').remove()
			}

			if(sys_num > 0 ){
				
				if($('.sys').length > 0){
					if(sys_num > 99){
						sys_val = '99+';
					}else{
						sys_val = sys_num.toString();
					}

					if($('.sys').find('.num').length > 0){
						$('.sys').find('.num').html(sys_val)
					}else{
						$('.sys').find('.txt').after('<strong class="num" data-sx_num="'+sys_num+'">'+sys_val+'</strong>');
					}

				}
				
			}else{
				$('.sys').find('.num').remove()
			}

			set_msg_dot(sx_num, reply_num, at_num, sys_num);
		}

		var scrollPos;
		// window.onbeforeunload = function () { 
		//     // var scrollPos;  
		//     // if (typeof window.pageYOffset != 'undefined') {  
		//     //     scrollPos = window.pageYOffset;  
		//     // }  
		//     // else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {  
		//     //     scrollPos = document.documentElement.scrollTop;  
		//     // }  
		//     // else if (typeof document.body != 'undefined') {  
		//     //     scrollPos = document.body.scrollTop;  
		//     // }  
		//     if(scrollPos != undefined){
		    	
		//     	document.cookie = "scrollTop=" + scrollPos; //存储滚动条位置到cookies中  	
		//     }
		    
		//     // document.cookie = "duration=" + $('#scroller').css('transition-duration');
		//     console.log(scrollPos)
		// }  
		  
		// window.onload = function () {  
		//     if (document.cookie.match(/scrollTop=([^;]+)(;|$)/) != null) {  
		//         var arr = document.cookie.match(/scrollTop=([^;]+)(;|$)/); //cookies中不为空，则读取滚动条位置  
		//         // $('#load_wrapper').scrollTop = parseInt(arr[1]);  
		//         // document.body.scrollTop = parseInt(arr[1]);  
		//      //    if(arr[1] == 'undefined'){
		// 	    // 	var yy = 0;
		// 	    // }else{
		// 	    // 	var yy = parseInt(arr[1]);  	
		// 	    // }console.log('yy='+yy)
			    
		//     }  
		// }  

	
		
	</script>
	<!--JS-->
	<!--<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>-->
	<!-- <script src="__PUBLIC__/Js/front/wxapi.js"></script> -->

    <!-- <script src="/stat.js?version=<?php echo $_smarty_tpl->tpl_vars['version']->value;?>
"></script> -->

	
<script type="text/javascript" src="__PUBLIC__/Js/front/js/lazy-load-img.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/front/iscroll.js"></script>

<?php if ($_smarty_tpl->tpl_vars['channel_type']->value=='normal'){?>
<script type="text/javascript" src="__PUBLIC__/Js/front/js/normal_post_load.js"></script>
<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='praise'){?>
<script type="text/javascript" src="__PUBLIC__/Js/front/js/praise_post_load.js"></script>
<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='reward'){?>
<script type="text/javascript" src="__PUBLIC__/Js/front/js/reward_post_load.js"></script>
<?php }elseif($_smarty_tpl->tpl_vars['channel_type']->value=='crowdfunding'){?>
<script type="text/javascript" src="__PUBLIC__/Js/front/js/cf_post_load.js"></script>
<?php }?>


	
<script>
	var total = parseInt('<?php echo $_smarty_tpl->tpl_vars['total']->value;?>
');
    var firstRow = parseInt('<?php echo $_smarty_tpl->tpl_vars['firstRow']->value;?>
');
    var channel_id = '<?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_id'];?>
'
    var channel_name = '<?php echo $_smarty_tpl->tpl_vars['channel']->value['channel_name'];?>
'
    var signing = false;
    var following = false;
    var $is_sign = '<?php echo $_smarty_tpl->tpl_vars['is_sign']->value;?>
';
    // var is_sign = <?php if ($_smarty_tpl->tpl_vars['is_sign']->value){?>true<?php }else{ ?>false<?php }?>;
    var is_sign = <?php if ($_smarty_tpl->tpl_vars['is_sign']->value){?>true<?php }else{ ?>false<?php }?>;

	
	$(function(){
		var imgw = $('.item_imgbox li').width()
		imgh = $('.item_imgbox li').height(imgw);

		// 百分比
		$('.line-inner').width($('.line-inner').attr("data-width")+"%");

		var lazyLoadImg = new LazyLoadImg({
	        el: document.querySelector('#load_wrapper'),
	        mode: 'default', //默认模式，将显示原图，diy模式，将自定义剪切，默认剪切居中部分
	        time: 250, // 设置一个检测时间间隔
	        complete: true, //页面内所有数据图片加载完成后，是否自己销毁程序，true默认销毁，false不销毁
	        position: { // 只要其中一个位置符合条件，都会触发加载机制
	          top: 0, // 元素距离顶部
	          right: 0, // 元素距离右边
	          bottom: 0, // 元素距离下面
	          left: 0 // 元素距离左边
	        },
	        before: function () { // 图片加载之前执行方法
	          
	        },
	        success: function (el) { // 图片加载成功执行方法
	          // el.classList.add('success')
	        },
	        error: function (el) { // 图片加载失败执行方法
	          // el.src = './images/error.png'
	        }
	    })
	    //
		if(!is_ios()){
			$('.home_list .tag').css('padding-top','1px');
		}
	})
		
	

    $(function(){
    	$('.btn_gz').click(function(){
			// $(this).hide();
			// $('.gz_yes').show();
			// $('.qiandao').show();
			if(following){
				return;
			}
			following = true;
			follow(1);
		})
	    
	    $('.qiandao').on('click',function(){
	    	if(signing){
	    		return;
	    	}
	    	signing = true;
	    	$.ajax({
	    		url:'/FrontChannel/sign',
	    		type:'post',
	    		data:{channel_id:channel_id},
	    		success:function(r){
	    			if(r.code == 1){
	    				$('#tan').html(r.msg);
	    				tishi();
	    			}else{
	    				is_sign = true;
	    				var imgw = $('.item_imgbox li').width()
						imgh = $('.item_imgbox li').height(imgw);
						// 百分比
						$('.line-inner').width(r.exp_rate+"%")
						$('.rank').html(r.rank);

	    				$('.qiandao').hide();
				    	toast('已签到成功', 'succ');
						$('.qd_yes').show();
						native_listen('follow_channel');// 签到因为刷新页面相同 所以用同一事件
	    			}
	    			signing = false;
	    		}
	    	})

	    	
	    })  
    });
    // 取消关注
    $('.gz_yes').on('click',function(){
		// $(this).hide();
		// $('.qd_yes').hide();
		// $('.qiandao').hide();
		// $('.btn_gz').show();
		if(following){
			return;
		}
		following = true;
		follow(2);
    })


    function follow(type){
    	//1关注，2取关
    	$.ajax({
    		url:'/Front/follow_channel',
    		type:'post',
    		data:{channel_id:channel_id},
    		success:function(r){
    			if(type == 1){
    				if(r.code == 1){
    					$('#tan').html(r.msg);
    				}else{
    					$('.btn_gz').hide();
						$('.gz_yes').show();
						if(is_sign){
							$('.qd_yes').show();
						}else{
							$('.qiandao').show();
						}
						$('.rank').html(r.rank);
						native_listen('follow_channel');
    				}
    				following = false;
    			}else if(type == 2){
    				if(r.code == 1){
    					$('#tan').html(r.msg);
    				}else{
    					$('.gz_yes').hide();
				    	$('.qd_yes').hide();
						$('.qiandao').hide();
				    	$('.btn_gz').show();
						native_listen('follow_channel');
    				}
    				following = false;
    			}
    		}
    	})
    }

    

 
</script>


	
	<?php if (@ACTION_NAME=='mall_home'){?>
		<script type="text/javascript">
		     $('#slider_cont').flexslider({
		          animation: "fade",
		          direction: "horizontal",
		          easing: "swing",
		     });
		</script>
	<?php }?>

</body>
</html>
<?php }?>
<?php }} ?>